'''
捕获异常，异常处理
异常传递
'''


def open_flie():
    f = None
    try:
        f = open("aaa.txt", "r", encoding="UTF-8")
    except FileNotFoundError as e:
        print("FileNotFoundError")
        print(e)
    except:
        print("except")
    else:
        print("else")
    finally:
        print("finally")
        if f is not None:
            f.close()


open_flie()
